// ==UserScript==
// @name         gitee-QQ表情
// @namespace    https://gitee.com/
// @version      1.5
// @description  try to take over the world!
// @author       cjwen6
// @match        https://gitee.com/*
// @updateURL    https://gitee.com/zeng016/bq/raw/master/bqmonkey.js
// @downloadURL  https://gitee.com/zeng016/bq/raw/master/bqmonkey.js
// @icon         https://q-q-b-q.cjwen6.cn/s187.gif
// @grant        none
// ==/UserScript==

;
(function() {
    'use strict';
    var lt = "";
    var ltn = 1;
    setInterval(function(){
        var cjwa = document.getElementsByClassName("markdown-body");
        if(location.href != lt || cjwa.length != ltn){
            lt = location.href;
            console.log("伟大的/youl，万岁！");
            if(cjwa.length == 0){
                lt = "";
            }else{
                ltn = cjwa.length;
                for(let j = 0; j < cjwa.length; j++){
                    var tpw = "https://q-q-b-q.cjwen6.cn/s";
                    var sz = [
                        ["se", "2"],
                        ["ll", "5"],
                        ["fn", "11"],
                        ["cy", "13"],
                        ["tuu", "19"],
                        ["jk", "26"],
                        ["yiw", "32"],
                        ["yun", "34"],
                        ["qiang", "76"],
                        ["ruo", "77"],
                        ["ws", "78"],
                        ["qd", "100"],
                        ["kk", "107"],
                        ["qq", "109"],
                        ["kel", "111"],
                        ["lq", "114"],
                        ["xyx", "178"],
                        ["youl", "187"],
                        ["cf", "230"],
                        ["kx", "283"],
                        ["bx", "297"],
                        ["yqq", "305"],
                        ["cw", "317"],
                        ["chongb", "318"]
                    ]
                    for(let i = 0; i < sz.length; i++){
                        cjwa[j].innerHTML = cjwa[j].innerHTML.replaceAll('/'+sz[i][0], '<img src="'+tpw+sz[i][1]+'.gif" class="qqbq" style="background-Color: transparent;width: 28px;position: relative;top: 5px;">');
                    }
                    var cjwb = document.getElementsByClassName("qqbq");
                }
            }
        }
    },500);

    // Your code here...
})();